Princeton University
2024-05-15
Combine narrative with code
Automatically generate figures and tables
Automatically render results in text
Format the content into a scientific paper (including citations!)
Something that looks pretty!
Rinse & repeat
:::{.columns}
Quarto handles literate programming by using a series of programs:
How Quarto Works (Source)
knitr executes all code chunks and creates a new markdown (.md) filepandoc takes the markdown file generated and converts it to the desired format.Visual Mode represents a What You See Is What You Get (WYSIWYG) editor. This mode is similar to Word.
(1) Eliminate human error in copying and pasting results
Retraction Watch by Adam Marcus, Ivan Oransky, and Alison McCook Monitors for authors retracting their paper from a journal.
One such case of a paper being retracted due to an Excel error was the Growth in a Time of Debt by Reinhart & Rogoff.
(2) Easy revisions and specification of desired figures and tables
When revisions are requested, one might have to tweak tables and figures by hand constantly, leading to a major incentive never to rerun analyses because it would mean re-pasting and re-illustrating all the numbers and figures in a paper.
(3) Promote computational reproducibility
Easy verification and replication of research findings
While programming environments may seem counter-intuitive for writing papers, they ultimately prevent mistakes and save time.
Approach 1: Start from scratch (now)
Creating a Quarto manuscript
Note
Always start a new project folder!
Approach 2: Start with a sample template (later)
In the top left, click the White Plus and select “Quarto Document…”
In the new prompt, enter a title, author name, and press “Create”
Getting Started section of website and complete each part05:00
Annotated sections of the “Hello Quarto” document related to document information, text formatting, and code execution
Annotated source to output of the “Hello Quarto” document
Annotated “Hello Quarto” document navigation options
---
title: My Reproducible Manuscript
authors:
- name: Norah Jones
affiliation: The University
roles: writing
corresponding: true
bibliography: references.bib
format: html
---Wait… what’s the YAML acronym?
Originally: “Yet Another Markup Language”
Later: “YAML Ain’t Markup Language”
Set global manuscript options with key-value pairs
APS 2024